<template>
	<view class="content bg-#F6F9F8 h-100vh photo-white">

		<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" theme="white" />
		
		<view style="overflow: hidden;">
			<view class="news_detail_title">
				{{newsInfo.title}}
			</view>
			<view class="news_detail_text">
				<rich-text :nodes="newsInfo.content"></rich-text>
			</view>
		</view>
		
		
	</view>

</template>

<script>
	import {
		navigateTo,
		navigateBack
	} from "@/hooks";
	import custom_navbar from "./components/photo.vue";
	import {
		noticeInfo
	} from '@/api/home';
	// import uParse from '@/components/u-parse/u-parse.vue';
	import store from "@/store";



	export default {
		components: {
			custom_navbar
			// uParse
		},
		data() {
			return {

				navigateTo,
				navigateBack,
				navbar_title: "景区消息",
				statusBarHeight: 20,
				
				newsInfo:{},
				id:''

			};
		},
		computed: {
			rec_url() {
				return this.$store.getters.rec_url;
			}

		},


		mounted() {
			let that = this;
			const info = uni.getSystemInfoSync();
			that.statusBarHeight = info.statusBarHeight + 43;

		},

		onLoad(options) {
			let id = options.id;
			if(id){
				this.getInfo(id)
			}

		},


		onShow() {

		},


		methods: {

			// 获取头的高度
			getNavHeight(e) {
				this.NavHeight_infoHeight += e;
			},
			
			async getInfo(id){
				let res = await noticeInfo({id:id});
				this.newsInfo = res.data;
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import './this.scss';
</style>